export interface GetSpuListParamsModel {
  page: number;
  limit: number;
  category3Id: number;
}

export interface SpuImageModel {
  imgName: string;
  imgUrl: string;
  id?: number;
  // 为了上传图片使用
  uid?: number;
  status?: string;
}

export type SpuImageListModel = SpuImageModel[];

export interface SpuSaleAttrValueModel {
  id?: number;
  baseSaleAttrId: number;
  saleAttrValueName: string;
  uid?: number;
}

export type SpuSaleAttrValueListModel = SpuSaleAttrValueModel[];

export interface SpuSaleAttrModel {
  // 基础销售属性的id
  baseSaleAttrId: number; // 注意类型
  // 基础销售属性的名称
  saleAttrName: string;
  // 销售属性值列表
  spuSaleAttrValueList: SpuSaleAttrValueListModel;
  // 是否显示编辑模式
  isShowEdit?: boolean;
  id?: number;
}

export type SpuSaleAttrListModel = SpuSaleAttrModel[];
export interface SpuModel {
  id?: number;
  category3Id?: number;
  spuName: string;
  description: string;
  tmId: number | undefined;
  spuSaleAttrList: SpuSaleAttrListModel;
  spuImageList: SpuImageListModel;
}

export type SpuListModel = SpuModel[];

export interface GetSpuListResponseModel {
  records: SpuListModel;
  total: number;
}

export interface BaseSaleAttrModel {
  id: number;
  name: string;
}

export type BaseSaleAttrListModel = BaseSaleAttrModel[];
